package o;

import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.extractor.ts.TsPayloadReader.a;

public final class agu implements agq {
    private boolean ˊ;
    private aef ˎ;
    private anq ˏ;

    public void ˊ(anq o_anq, ady o_ady, a aVar) {
        this.ˏ = o_anq;
        aVar.ˊ();
        this.ˎ = o_ady.ˊ(aVar.ˏ(), 4);
        this.ˎ.ˎ(Format.ˏ(aVar.ˎ(), "application/x-scte35", null, -1, null));
    }

    public void ˏ(anc o_anc) {
        if (!this.ˊ) {
            if (this.ˏ.ˎ() != -9223372036854775807L) {
                this.ˎ.ˎ(Format.ˏ(null, "application/x-scte35", this.ˏ.ˎ()));
                this.ˊ = true;
            } else {
                return;
            }
        }
        int ˊ = o_anc.ˊ();
        this.ˎ.ˎ(o_anc, ˊ);
        this.ˎ.ˋ(this.ˏ.ˊ(), 1, ˊ, 0, null);
    }
}
